<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%--JSP表达式--%>
<%=new java.util.Date()%>

<hr>

<%--Jsp脚本片段--%>
<%
    int sum = 0;
    for (int i = 0; i < 100; i++) {
        sum += i;
    }
    out.println("<h1>Sum=" + sum + "</h1>");
%>

<hr>

<%
    int x = 10;
    out.println(x);
%>
<p>个是一个JSP文档</p>
<%
    int y = 2;
    out.println(y);
%>

<hr>

<%
    for (int i = 0; i < 5; i++) {

%>
<h5>Hello World<%=i%></h5>
<%
    }
%>

<%!
    static {
        System.out.println("我愿称之为最强");
    }

    int global = 10;

    public void display() {
        System.out.println("调用了display");
    }
%>

<%--EL表达式--%>
<%
    for (int i = 0; i < 5; i++) {
%>
<h5>Hello World ${i}</h5>
<%}%>

</body>
</html>
